package cn.webestar.scms.microsvc.runner;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class AppStartRunner implements ApplicationRunner {

    @Value("${spring.application.name:--}")
    private String appName;

    @Value("${app.version:--}")
    private String version;

    @Value("${app.build.timestamp:--}")
    private String buildTime;

    @Override
    public void run(ApplicationArguments args) {
        log.info("App info: appName={}, version={}, buildTime={}", appName, version, buildTime);
    }

}
